package Action;

import PO.ContactWayPage;
import com.epwk.action.Action;
import com.epwk.tools.RandomNum;
import org.openqa.selenium.By;

/**
 * Created by Administrator on 2016/11/25.
 */
public class ContactWay {

    public static void contact(int contactId){

        By by = null;
        Action.click(ContactWayPage.waysSelections);
        switch (contactId){
            case 1:
                Action.click(ContactWayPage.phone);
                Action.clear(ContactWayPage.wayConcent);
                Action.sendkeys(ContactWayPage.wayConcent,String.valueOf(RandomNum.getNumRandom(11)));
                break;
            case 2:
                Action.click(ContactWayPage.qq);
                Action.clear(ContactWayPage.wayConcent);
                Action.sendkeys(ContactWayPage.wayConcent,String.valueOf(RandomNum.getNumRandom(10)));
                break;
            case 3:
                Action.click(ContactWayPage.email);
                Action.clear(ContactWayPage.wayConcent);
                Action.sendkeys(ContactWayPage.wayConcent,String.valueOf(RandomNum.getNumRandom(10)+"@qq.com"));
                break;
            default:
                Action.click(ContactWayPage.phone);
                Action.clear(ContactWayPage.wayConcent);
                Action.sendkeys(ContactWayPage.wayConcent,String.valueOf(RandomNum.getNumRandom(11)));
        }
    }

}
